<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%@ include file="/common/user.jsp"%>
<%
    // 删除就诊卡
	Integer id = input.getInt("id");
    List<PatientCard> patientCards = QBuilder.db("basedb").select().from("PatientCard").where(new Where("hospital=", hospital).and("id=", id).and("status=", STATUS_ENABLE)).query().getResultObj();
    if (patientCards.size() == 0 ) {
		Tools.encryptPrint(out, new Message(30041, "就诊卡信息不存在"));
        return ;
	}
	PatientCard pc = patientCards.get(0);
	pc.setStatus(STATUS_DISABLE);
	DBTools.db("basedb").modItem(pc, id);
    msg.put("data", card(pc));
    Tools.encryptPrint(out, msg);
%>
